package com.leadingsoft.pwxk.services.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.leadingsoft.pwxk.model.RegionCode;
import com.leadingsoft.pwxk.repository.RegionCodeRepository;
import com.leadingsoft.pwxk.services.AbstractService;
import com.leadingsoft.pwxk.services.RegionCodeService;

@Service
public class RegionCodeServiceImpl extends AbstractService<RegionCode> implements RegionCodeService {

	@Autowired
	RegionCodeRepository regionCodeRepository;

	@Override
	public void save(RegionCode regionCode) {
		regionCodeRepository.save(regionCode);
	}

	@Override
	public void saveAll(List<RegionCode> models) {
		regionCodeRepository.saveAll(models);

	}

	@Override
	public void deleteAll() {
		regionCodeRepository.deleteAll();
	}

	@Override
	public Long getCount() {
		return regionCodeRepository.count();
	}
}
